package com.ypaco.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.xml.client.*;
import com.ypaco.ajax.client.*;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class {name} implements EntryPoint {
	
	final RemoteXML rq=new RemoteXML(OSServers.mainserver()+"/login.php","POST");
	
	public void onModuleLoad() {
		
		final TextBox txt=new TextBox();
		RootPanel.get("txt").add(txt);
		Window.alert("i'm working...");
	}	
	
	public void fireRequest()
	{
		rq.request(null, new RemoteXMLRequestCallback(){
			public void onFailure(Throwable ex) {
				ErrorAlerter.alertException(ex);
			}

			public void onSuccess(Document xml) {
				try
				{
					XmlProcessor proc=new XmlProcessor(xml);
					Node root=proc.getRootNode("result");
				}catch(Throwable ex)
				{
					ErrorAlerter.alertException(ex);
				}
			}
		});
	}

}
